/**   
* @Title: ChangePassService.java 
* @Description: TODO
* @author Mengting Lu   
* @date 2015年8月11日 下午3:14:45 
*/
package com.onstar.cn.api;

import com.onstar.cn.api.framework.ClazzInjectUtils;
import com.onstar.cn.api.framework.annotation.Path;
import com.onstar.cn.api.framework.annotation.PathParams;
import com.onstar.cn.api.framework.annotation.RequestMapping;
import com.onstar.cn.framework.network.entity.RequestEntity;

/**
 * @ClassName: ChangePassService
 * @Description:
 * @author Mengting Lu
 * @date 2015年8月11日 下午3:14:45
 */
@Path("/msp/api/v3")
public class ChangePassService {
	private String serverURL;

	/**
	 * @Description: TODO
	 * @author Mengting Lu
	 * @date 2015年8月21日 下午4:23:07
	 */
	public ChangePassService(String serverURL) {
		this.serverURL = serverURL;
	}
    /**
     * 
    * @Title: GetovdMail 
    * @Description: 车况检测报告
    * @param @param requestEntity
    * @param @param subscriberID
    * @param @param accountID
    * @param @param vin
    * @param @return    设定文件 
    * @return RequestEntity    返回类型 
    * @throws
     */
	@RequestMapping("/user/subscriber/{subscriberID}/accounts/{accountID}/vehicles/{vin}/ovds")
	public RequestEntity GetovdMail(RequestEntity requestEntity,
			@PathParams(value = "subscriberID") String subscriberID, @PathParams(value = "accountID") String accountID,
			@PathParams(value = "vin") String vin) {
		if (requestEntity == null) {
			requestEntity = new RequestEntity();
		}
		String url = ClazzInjectUtils.injectUrl(getClass(), "GetovdMail", requestEntity, subscriberID, accountID, vin);
		requestEntity.setUrl(serverURL + url);
		return requestEntity;
	}

	/**
	 * 
	 * @Title: GetovdDetail @Description: 车况检测报告详情 @param @return 设定文件 @return
	 *         RequestEntity 返回类型 @throws
	 */
	@RequestMapping("/user/subscriber/{subscriberID}/accounts/{accountID}/vehicles/{vin}/ovds/{ovdID}")
	public RequestEntity GetovdDetail(RequestEntity requestEntity,
			@PathParams(value = "subscriberID") String subscriberID, @PathParams(value = "accountID") String accountID,
			@PathParams(value = "vin") String vin, @PathParams(value = "ovdID") String ovdID) {
		if (requestEntity == null) {
			requestEntity = new RequestEntity();
		}
		String url = ClazzInjectUtils.injectUrl(getClass(), "GetovdDetail", requestEntity, subscriberID, accountID, vin,
				ovdID);
		requestEntity.setUrl(serverURL + url);
		return requestEntity;
	}



	// Get subscriber's packages
	@RequestMapping("/user/subscriber/{subscriberID}/accounts/{accountID}/vehicles/{vin}/package/myPackages")
	public RequestEntity mypackge(RequestEntity requestEntity, @PathParams(value = "subscriberID") String subscriberID,
			@PathParams(value = "accountID") String accountID, @PathParams(value = "vin") String vin) {
		if (requestEntity == null) {
			requestEntity = new RequestEntity();
		}
		String url = ClazzInjectUtils.injectUrl(getClass(), "mypackge", requestEntity, subscriberID, accountID, vin);
		requestEntity.setUrl(url);
		return requestEntity;
	}

	// 为package创建订单
	@RequestMapping("/user/subscriber/{IDPID}/accounts/{accountID}/vehicles/{vin}/package/{packageID}/order")
	public RequestEntity order(RequestEntity requestEntity, @PathParams(value = "IDPID") String IDPID,
			@PathParams(value = "accountID") String accountID, @PathParams(value = "packageID") String packageID) {
		if (requestEntity == null) {
			requestEntity = new RequestEntity();
		}
		return requestEntity;
	}
}
